package com.ssy.lingxi.system.dao;

import com.ssy.lingxi.system.entity.PageTemplate;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PageTemplateRepository extends JpaRepository<PageTemplate, Long> {

    PageTemplate findBySiteIdAndShopIdAndTypeAndStatus(Long siteId, Long shopId, Integer type, Integer status);

    List<PageTemplate> findAllByType(Integer type, Sort sort);

    List<PageTemplate> findAllByShopId(Long shopId);

    List<PageTemplate> findAllBySiteIdAndShopIdAndEnvironmentAndType(Long siteId, Long shopId, Integer environment, Integer type);

    List<PageTemplate> findAllBySiteIdAndEnvironmentAndType(Long siteId, Integer environment, Integer type);
}
